home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / tclX-6.4 / help / debug / profile < prev    next >
Encoding:
Text File  |  1992-12-17  |  1.7 KB  |  33 lines

  1.  
  2.  
  3.           profile [-commands] on
  4.                profile off arrayVar
  5.                This command is used to collect a performance profile
  6.                of a Tcl script.  It collects data at the Tcl procedure
  7.                level. The number of calls to a procedure, and the
  8.                amount of real and CPU time is collected. Time is also
  9.                collected for the global context.  The procedure data
  10.                is collected by bucketing it based on the procedure
  11.                call stack, this allows determination of how much time
  12.                is spent in a particular procedure in each of it's
  13.                calling contexts.
  14.  
  15.                The on option enables profile data collection. If the
  16.                -commands option is specifed, data on all commands
  17.                within a procedure is collected as well a procedures.
  18.                Multiple occurrences of a command within a procedure
  19.                are not distinguished, but this data may still be
  20.                useful for analysis.
  21.  
  22.                The off option turns off profiling and moves the data
  23.                collected to the array arrayVar.  The array is address
  24.                by a list containing the procedure call stack.  Element
  25.                zero is the top of the stack, the procedure that the
  26.                data is for.  The data in each entry is a list
  27.                consisting of the procedure call count and the real
  28.                time and CPU time in milliseconds spent in the
  29.                procedure (and all procedures it called). The list is
  30.                in the form {count real cpu}.  A Tcl procedure profrep
  31.                is supplied for reducing the data and producing a
  32.                report (see Tcl Package Library Procedures section).
  33.